/*
 * @Descripttion: 
 * @version: 
 * @Author: hzj-1510017964@qq.com
 * @Date: 2020-04-30 09:17:22
 * @LastEditors: hzj-1510017964@qq.com
 * @LastEditTime: 2020-04-30 09:25:21
 */

let httpRequest = {}


httpRequest.success = (code,state,data) =>{
    let successObj = {
        code: code|| 200,
        state:state || 'success',
        data:data
    }
    return successObj
}



httpRequest.fail = (code,state,data) =>{
    let failObj = {
        code: code|| 401,
        state:state || 'error',
        data:data
    }
    return failObj
}



module.exports = httpRequest

